Voice Coding Examples
The following are examples of dictating code with Community commands. Cursorless could have shortened some of the commands, but was not used for ease of learning and for those who don't use an editor supporting Cursorless.
Within every utterance, each voice command is surrounded by “double quotes”. Bold indicates an argument constrained to a list of options (e.g., available snippets). Italics indicates any word and underlining indicates any phrase can be substituted.
Note that you do not have to pause between voice commands when using Talon (“continuous command recognition”).
Adding Even Values
def add_even_values(values):
total = 0
for v in values:
if v % 2 == 0:
total += v
return total
example_values = [1, 3, 2, 4]
even_total = add_even_values(example_values)
print(even_total)
commands:
"snip funk add even values"
def add_even_values():
"word values" "snip next"
def add_even_values(values):
"word total" "op equals" "numb zero"
def add_even_values(values):
total = 0
"slap" "snip for each" "vest"
def add_even_values(values):
total = 0
for v in :
"snip next" "word values" "snip next"
def add_even_values(values):
total = 0
for v in values:
"snip if" "vest" "op mod" "numb two"
def add_even_values(values):
total = 0
for v in values:
if v % 2:
"is equal" "numb zero" "snip next"
def add_even_values(values):
total = 0
for v in values:
if v % 2 == 0:
"word total" "op plus equals" "vest"
def add_even_values(values):
total = 0
for v in values:
if v % 2 == 0:
total += v
"slap" "wipe" "twice" "snip return" "word total"
def add_even_values(values):
total = 0
for v in values:
if v % 2 == 0:
total += v
return total
"slap" "wipe" "snake example values"
def add_even_values(values):
total = 0
for v in values:
if v % 2 == 0:
total += v
return total
example_values
"op equals" "box" "numb one" "comma" "space"
def add_even_values(values):
total = 0
for v in values:
if v % 2 == 0:
total += v
return total
example_values = [1, ]
"numb three" "comma" "space" "numb two" "comma" "space" "numb four"
def add_even_values(values):
total = 0
for v in values:
if v % 2 == 0:
total += v
return total
example_values = [1, 3, 2, 4]
"slap" "snake even total"
def add_even_values(values):
total = 0
for v in values:
if v % 2 == 0:
total += v
return total
example_values = [1, 3, 2, 4]
even_total
"op equals" "snake add even values"
def add_even_values(values):
total = 0
for v in values:
if v % 2 == 0:
total += v
return total
example_values = [1, 3, 2, 4]
even_total = add_even_values
"round" "snake example values"
def add_even_values(values):
total = 0
for v in values:
if v % 2 == 0:
total += v
return total
example_values = [1, 3, 2, 4]
even_total = add_even_values(example_values)
"slap" "funk print" "snake even total"
def add_even_values(values):
total = 0
for v in values:
if v % 2 == 0:
total += v
return total
example_values = [1, 3, 2, 4]
even_total = add_even_values(example_values)
print(even_total)